package com.cskaoyan.mapper;

import com.cskaoyan.bean.Teacher;
import com.cskaoyan.bean.TeacherVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface TeacherMapper {

    // 通过id查询名字
    String selectNameById(Integer id);

    // 查询所有的名字
    Set<String> selectNameList();

    // 返回JavaBean
    Teacher selectTeacherById(@Param("id") Integer id);


    TeacherVO selectTeacherVOById(@Param("id") Integer id);

    // 多个对象
    List<Teacher> selectAll();


    // ResultMap
    TeacherVO selectTeacherVOByIdUseResultMap(@Param("id") Integer id);


    List<TeacherVO> selectTeacherVO(@Param("id") Integer id, @Param("name") String name, @Param("gender") String gender);

}
